//
// Created by 张跃译 on 2025/1/10.
//
#include "iostream"
#include "vector"
using namespace std;
#define eleType double
#ifndef CTEST_SEQUENTIAL_LIST_H
#define CTEST_SEQUENTIAL_LIST_H
struct  SequentialList{
    eleType* elements;
    int size;
    int capacity;
};

class MySequentialList{
public:
    //初始化
    void initSequentialList(SequentialList *list,int capacity);
    //销毁顺序表
    void destroyList(SequentialList *list);
    //判空
    bool isEmpty(SequentialList *list);
    //顺序表大小
    int size(SequentialList *list);
    //插入
    void insert(SequentialList *list,int index,eleType element);
    //删除
    void deleteElement(SequentialList *list,int index);
    //根据元素查找，返回下标
    int findElement(SequentialList *list,eleType element);
    //根据下标，拿到元素
    eleType getElement(SequentialList *list,int index);
    //更新元素
    void updateElement(SequentialList *list,int index,eleType element);
};

class MyVectorSequentialList{

};
#endif //CTEST_SEQUENTIAL_LIST_H

